load("@fbcode//buck2/tests:buck_e2e.bzl", "buck2_e2e_test")
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")

oncall("build_infra")

python_binary(
    # @autodeps-skip
    name = "health_check_server_bin",
    srcs = [
        "health_check_server.py",
    ],
    main_function = "buck2.tests.e2e.health_check.health_check_server.main",
    visibility = ["PUBLIC"],
    deps = [
        "fbcode//buck2/app/buck2_health_check_proto:health_check-py",
        "fbsource//third-party/grpc/src/python/grpcio/grpc:grpcio",
    ],
)

buck2_e2e_test(
    name = "test_health_check",
    srcs = ["test_health_check.py"],
    skip_for_os = [
        "windows",
    ],
    deps = [
        "fbcode//buck2/tests/e2e_util:utils",
    ],
)
